package gamesolitaire;

import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;

public class Filemanager {

/**Private constructor there are no changes needed here*/

private Filemanager() {
}
         
/**Reads Image and throw exception when its no available*/
public static BufferedImage loadImage(String filePath) throws Exception {
     BufferedImage image = null;
     File file = null;
     try{
         file = new File(filePath);
         image = ImageIO.read(file);
         }
     		catch (IOException ioe) {
                        throw new Exception("File could not be found: " + filePath, ioe);
            }
                return image;
}
}